﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ESupervision.Models
{
    public class ForumTopic
    {


        public int ForumTopicID { get; set; }
        public int ViewCount { get; set; }

        [Required]
        [MaxLength(250)]
        public string ForumTopicTitle { get; set; }

        [Required]
        [MaxLength(8000)]
        public string ForumTopicContent { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        public DateTime ForumTopicPostedTime { get; set; }

        [ForeignKey("ForumTopicPoster")]
        public string ForumTopicPosterID { get; set; }
        public virtual ApplicationUser ForumTopicPoster { get; set; }

        [InverseProperty("ForumReplyTopic")]
        public virtual ICollection<ForumReply> ForumReplies { get; set; }
    }
}